<template>
	<view class="container">
		
		<view class="list">
			<view class="item" v-for="(item,index) in list" @click="handleClickItem(item,index)">
					<text class="gui-icons gui-color-red" v-if="index == currentIndex">&#xe685;</text>
					<text class="gui-icons gui-color-gray" v-else>&#xe762;</text><text class="name">{{ item.name }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				currentIndex:-1,
				list:[
					{
						id:0,
						name:'韩天明',
						phone:'手机号'
					},
					{
						id:2,
						name:'韩天明',
						phone:'手机号'
					},
					{
						id:3,
						name:'韩天明',
						phone:'手机号'
					},
					{
						id:4,
						name:'韩天明',
						phone:'手机号'
					},
					{
						id:5,
						name:'韩天明',
						phone:'手机号'
					},
				]

			}
		},
		onShareAppMessage(res) {
			return this.$utils.onShareAppMessage();
		},
		onLoad() {

		},
		methods: {
			handleClickItem(item,index){
				this.currentIndex = index;
				this.$emit('change',item)
			}
		}
	}
</script>

<style scoped lang="scss">
.list{
	.item{
		margin-bottom: 30rpx;
		.name{
			margin-left: 10rpx;
		}
	}
}
</style>